package com.cloning;

public class Lab3 {
	public static void main(String[] args)throws CloneNotSupportedException{
		Employee emp = new Employee(101, "Dilip");
		emp.showClone();
		System.out.println("*************");
		
		Address ad = new Address("#30", "BTM");
		LoginInfo log = new LoginInfo("Dilip", "Enter");
		Student st = new Student(101, "DKirar", ad, log);
		System.out.println(st);
		System.out.println("--------------");
		Student stud = (Student) st.clone();
		System.out.println("\n After Cloning object");
		
		System.out.println(st==stud);
		System.out.println(st.studAdd==stud.studAdd);
		System.out.println(st.login==stud.login);
		
		System.out.println(st);
		System.out.println("-----------------");
		System.out.println(stud);
		System.out.println("\n Modified the Data");
		stud.sid = 90909;
		stud.name="sunil";
		
		stud.studAdd.street="Guna";
		stud.login.username="Manoj";
		System.out.println(st);
		System.out.println("++++++++++++");
		System.out.println(stud);
	
		
	}

}
